#ifndef __MODELEDITOR_CONTROLPANEL_H
#define __MODELEDITOR_CONTROLPANEL_H

#include "../../JuceLibraryCode/JuceHeader.h"

class ModelEditorMainFrame;

class ControlPanelPage  :	public Component,
							public ButtonListener,
							public SliderListener,
							public ComboBoxListener,
							public TextEditor::Listener,
							public Timer,
							public ChangeListener
{
public:
    ControlPanelPage(ModelEditorMainFrame *pMainFrame);
	~ControlPanelPage();
    void resized();
	void changeListenerCallback(ChangeBroadcaster*);
	void sliderValueChanged(Slider* sliderThatWasMoved);
	void comboBoxChanged(ComboBox* comboBoxThatHasChanged);
	void buttonClicked(Button* button);
	void visibilityChanged();
	void timerCallback();

	void textEditorTextChanged(TextEditor& editor);
	void textEditorEscapeKeyPressed(TextEditor& editor);
	void textEditorFocusLost(TextEditor& editor);
	void textEditorReturnKeyPressed(TextEditor &editor);

	void ResetUI();
   //==============================================================================
    juce_UseDebuggingNewOperator

private:
	//ScopedPointer<TextButton>		m_pResetButton;
	//ScopedPointer<PropertyPanel>	m_Control_Panel;
	ModelEditorMainFrame*			m_pMainFrame;



	ScopedPointer<Slider>			m_FrameSlider;
	ScopedPointer<TextButton>		m_PauseButton;
	ScopedPointer<TextButton>		m_NextFrameButton;
	ScopedPointer<TextButton>		m_LastFrameButton;
	ScopedPointer<TextButton>		m_NextAnimButton;
	ScopedPointer<TextButton>		m_LastAnimButton;
	ScopedPointer<ComboBox>			m_AnimChooseComboBox;
	ScopedPointer<Label>			m_AnimChooseLabel;
	ScopedPointer<TextEditor>		m_AnimSpeedEditor;
	ScopedPointer<Label>			m_AnimSpeedLabel;


	UINT							m_SliderFramesStart;
	UINT							m_SliderFramesEnd;

	float							m_SliderTimeStart;
	float							m_SliderTimeEnd;



    //==============================================================================
    // (prevent copy constructor and operator= being generated..)
    ControlPanelPage (const ControlPanelPage&);
    const ControlPanelPage& operator= (const ControlPanelPage&);
};


#endif